/*
 * Car.h
 *
 *  Created on: 21/11/2009
 *      Author: Facu
 */

#ifndef CAR_H_
#define CAR_H_

#include "map/MapPoint.h"
#include "util/MathUtils.h"

namespace map {

/*
 * Clase que representa al auto que recorre los mapas de la aplicacion
 */
class Car {

public:

	Car(int aceleration = 5, int maxSpeed = 180, double initialAngle = 0.0, double xPosition = 0.0, double yPosition = 0.0);

	virtual ~Car();

	virtual void accelerate();

	virtual void decelerate();

	virtual void stop();

	virtual void turnLeft();

	virtual void turnRight();

	virtual int getSpeed();

	virtual double getAngle();

	virtual void setAngle(double angle);

	virtual void setPosition(MapPoint position);

	virtual MapPoint getPosition();

	virtual int getMaxSpeed();

	virtual double advance(int deltaT);

	void turn(double angle);

private:

	void simplifyAngle();

	MapPoint position;
	int aceleration;
	int speed;
	int maxSpeed;
	double angle;


};

}

#endif /* CAR_H_ */
